The development of the EDVAC computer system of 1948 is often cited as the beginning of the computer era. Since that time, computer systems have evolved into extremely sophisticated devices, and computer systems may be found in many different settings. Computer systems typically include a combination of hardware components (such as semiconductors, integrated circuits, programmable logic devices, programmable gate arrays, power supplies, electronic card assemblies, sheet metal, cables, and connectors) and software, also known as computer programs, which are written in a programming language.
Modern programming languages use a number of approaches to dynamically load interdependent components of executable code, such as plug-ins and bundles. For example, languages such as C and C++, which compile source code to native code, generally use a linking process after the source code is compiled. This linking process merges code from separately compiled source files, along with shared library code, to form an executable program. But, other languages, e.g., the Java language, operate differently. With the Java language, the classes generated by the compiler generally remain just as they are until they are loaded into a JVM (Java Virtual Machine).
Rather than a separate step, linking classes is part of the job performed by the JVM when it loads them into memory. This adds some overhead as classes are initially loaded, but also provides a high level of flexibility for Java applications. For example, applications can be written to use interfaces with the actual implementations left unspecified until run time. This late binding approach to assembling an application is used extensively in the Java platform, with servlets being one common example.
Java classes are typically loaded only when needed, which is sometimes called lazy or on-demand loading. Another technique is to load classes on startup, but this technique does not load all required classes; instead only a small subset of classes are typically loaded at startup. Each class that is loaded may have other classes that it depends on, so the loading process is recursive. When a class is loaded and initialized, the JVM decodes the binary class format, checks compatibility with other classes, verifies the sequence of bytecode operations, and constructs a java.lang.Class instance to represent the new class. This Class object becomes the basis for all instances of the new class created by the JVM. The Class object is also the identifier for the loaded class itself; multiple copies of the same binary class can be loaded in a JVM, each with its own Class instance. Even though these copies all share the same class name, they will be separate classes to the JVM. Thus, the processing needed when a class is loaded is extensive.
Because of the extensive processing needed to load classes, the performance of an application can be slow until all the required classes are loaded. Without a better way to handle class preloading, applications will continue to suffer from poor performance. Although the aforementioned problems have been described in the context of Java-based applications, they may occur in the context of any programming languages that uses class loading.